﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BonsaiScrum.Core.Query.ProjectReport>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Stories For The <%= Html.Encode(Model.Name) %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%= Html.Encode(Model.Name) %> - Stories</h2>

    
    <table>
        <thead>
            <tr>
                <th>Id</th>
                <th>Description</th>
                <th># of Outstanding Tasks</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <% foreach (var story in Model.Stories) { %>
            <tr>
                <td><%= Html.DisplayFor(x => story.Id) %></td>
                <td><%= Html.DisplayFor(x => story.Description) %></td>
                <td><%= story.Tasks.Count %></td>
                <td><%= Html.ActionLink("Add Task", "Create", "Task", new { projectId = Model.Id, storyId = story.Id }, null) %></td>
            </tr>
            <% } %>
        </tbody>

    </table>

    <p>
        <%= Html.ActionLink("Create New Story", "Create", new { projectId = Model.Id })%>
    </p>
    <p>
        <%= Html.ActionLink("Back to Project Dashboard", "Dashboard", "Project", new { id = Model.Id }, null) %>
    </p>

</asp:Content>

